Read the dataset
library(readxl)
data=read.csv("/Users/taozheng/research_2.csv")
Data Description The abnormal returns for each segment are left skewed (negative skewness). Moreover, based on the kurtosis statistic, we can observe that the distribution of all abnormal returns is fat-tailed.
library(psych)
tech<-data$FTEC.technology.
en <-data$FENY.energy.
ma<-data$FMAT.materials.
ind <-data$FIDU.industrials.
cd <-data$FDIS.consumer.discretionary.
cs <- data$FSTA.consumer.staples.
hc <-data$FHLC.health.care.
fin <-data$FNCL.financials.
comm <-data$FCOM.communication.services.
ut <-data$FUTY.utilities.
re <-data$FREL.real.estate.
pol <-data$result
describeBy(tech)
Warning in describeBy(tech) : no grouping variable requested
describeBy(en)
Warning in describeBy(en) : no grouping variable requested
describeBy(ma)
Warning in describeBy(ma) : no grouping variable requested
describeBy(ind)
Warning in describeBy(ind) : no grouping variable requested
describeBy(cd)
Warning in describeBy(cd) : no grouping variable requested
describeBy(cs)
Warning in describeBy(cs) : no grouping variable requested
describeBy(hc)
Warning in describeBy(hc) : no grouping variable requested
describeBy(fin)
Warning in describeBy(fin) : no grouping variable requested
describeBy(comm)
Warning in describeBy(comm) : no grouping variable requested
describeBy(ut)
Warning in describeBy(ut) : no grouping variable requested
describeBy(re)
Warning in describeBy(re) : no grouping variable requested
describeBy(pol)
Warning in describeBy(pol) : no grouping variable requested
strong rejection of Jarque-Bera statistic at 1% significance level
library(tseries)
jarque.bera.test(tech)
Jarque Bera Test
data: tech
X-squared = 43.562, df = 2, p-value = 3.473e-10
jarque.bera.test(en)
Jarque Bera Test
data: en
X-squared = 129.5, df = 2, p-value < 2.2e-16
jarque.bera.test(ma)
Jarque Bera Test
data: ma
X-squared = 134.04, df = 2, p-value < 2.2e-16
jarque.bera.test(ind)
Jarque Bera Test
data: ind
X-squared = 125.64, df = 2, p-value < 2.2e-16
jarque.bera.test(cd)
Jarque Bera Test
data: cd
X-squared = 81.424, df = 2, p-value < 2.2e-16
jarque.bera.test(cs)
Jarque Bera Test
data: cs
X-squared = 34.694, df = 2, p-value = 2.926e-08
jarque.bera.test(hc)
Jarque Bera Test
data: hc
X-squared = 28.32, df = 2, p-value = 7.087e-07
jarque.bera.test(fin)
Jarque Bera Test
data: fin
X-squared = 193.57, df = 2, p-value < 2.2e-16
jarque.bera.test(comm)
Jarque Bera Test
data: comm
X-squared = 25.849, df = 2, p-value = 2.437e-06
jarque.bera.test(ut)
Jarque Bera Test
data: ut
X-squared = 472.63, df = 2, p-value < 2.2e-16
jarque.bera.test(re)
Jarque Bera Test
data: re
X-squared = 1427.2, df = 2, p-value < 2.2e-16
jarque.bera.test(pol)
Jarque Bera Test
data: pol
X-squared = 18.655, df = 2, p-value = 8.896e-05
Q-statistic for squared residuals (Ljung-Box Q-statistic) Q(10)-The data is not seasonal, lag will take 10. There are ARCH(auto- regressive conditional heteroscedasticity) effects in all the abnoraml return series.
Correlation and Stationary
library(lmtest)
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
library(urca)
cor(pol,tech)
[1] -0.1177176
cor(pol, en)
[1] -0.09032242
cor(pol, ma)
[1] -0.0785672
cor(pol, ind)
[1] -0.0935785
cor(pol, cd)
[1] -0.1276915
cor(pol, cs)
[1] -0.1658682
cor(pol, hc)
[1] -0.07740866
cor(pol, fin)
[1] -0.07476974
cor(pol, comm)
[1] -0.12754
cor(pol, ut)
[1] -0.06759364
cor(pol, re)
[1] -0.09010542
The abnormal return series are all stationary, while the cyber policy index is a stationary series just in 10% significance level.
adf.test(pol)
Warning in adf.test(pol) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: pol
Dickey-Fuller = -4.2264, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(tech)
Warning in adf.test(tech) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: tech
Dickey-Fuller = -4.8083, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(en)
Warning in adf.test(en) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: en
Dickey-Fuller = -5.2495, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(ma)
Warning in adf.test(ma) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: ma
Dickey-Fuller = -4.9004, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(ind)
Warning in adf.test(ind) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: ind
Dickey-Fuller = -4.6042, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(cd)
Warning in adf.test(cd) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: cd
Dickey-Fuller = -4.5135, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(cs)
Warning in adf.test(cs) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: cs
Dickey-Fuller = -4.0278, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(hc)
Warning in adf.test(hc) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: hc
Dickey-Fuller = -4.2441, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(fin)
Warning in adf.test(fin) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: fin
Dickey-Fuller = -4.8208, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(comm)
Warning in adf.test(comm) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: comm
Dickey-Fuller = -4.6255, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(ut)
Warning in adf.test(ut) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: ut
Dickey-Fuller = -5.2508, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
adf.test(re)
Warning in adf.test(re) : p-value smaller than printed p-value
Augmented Dickey-Fuller Test
data: re
Dickey-Fuller = -5.2285, Lag order = 5, p-value = 0.01
alternative hypothesis: stationary
for (i in 1:10) print (grangertest(pol~tech, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(tech, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.2648 0.6074
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(tech, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.5826 0.5594
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(tech, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.54 0.6554
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(tech, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.2873 0.886
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(tech, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.3984 0.8496
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(tech, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.4281 0.8596
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(tech, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.7323 0.6448
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(tech, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.6477 0.7368
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(tech, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.6624 0.7421
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(tech, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.6291 0.7877
fit<-lm(tech~pol)
summary(fit)
Call:
lm(formula = tech ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.154555 -0.022576 -0.000024 0.021155 0.128882
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.002942 0.003892 0.756 0.4506
pol -0.027790 0.016139 -1.722 0.0865 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.0374 on 211 degrees of freedom
Multiple R-squared: 0.01386, Adjusted R-squared: 0.009184
F-statistic: 2.965 on 1 and 211 DF, p-value: 0.08655
acf(tech,lag=40)
pacf(tech, lag=40)
y<-tech-mean(tech)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 54.556, df = 7, p-value = 1.825e-09
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 108.12, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
t=ts(tech,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 3.1168, df = 1, p-value = 0.07749
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 4.0792, df = 2, p-value = 0.1301
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 35.718, df = 3, p-value = 8.591e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 38.348, df = 4, p-value = 9.497e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 42.372, df = 5, p-value = 4.952e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 42.208, df = 6, p-value = 1.673e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 43.957, df = 7, p-value = 2.179e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 43.766, df = 8, p-value = 6.298e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 43.764, df = 9, p-value = 1.56e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 43.952, df = 10, p-value = 3.358e-06
The linear relationship is not significant because R square is very small. Box-Ljung test shows they have a strong ARCH effect.
for (i in 1:10) print (grangertest(pol~en, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(en, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.3231 0.5704
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(en, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.2258 0.7981
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(en, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.3454 0.7925
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(en, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.2294 0.9216
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(en, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.2402 0.9443
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(en, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.4783 0.824
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(en, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.4536 0.8669
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(en, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.7774 0.6231
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(en, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.8053 0.6119
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(en, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.6921 0.731
fit<-lm(en~pol)
summary(fit)
Call:
lm(formula = en ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.273015 -0.029792 -0.000993 0.028752 0.172818
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.004120 0.005712 0.721 0.472
pol -0.031200 0.023683 -1.317 0.189
Residual standard error: 0.05488 on 211 degrees of freedom
Multiple R-squared: 0.008158, Adjusted R-squared: 0.003457
F-statistic: 1.736 on 1 and 211 DF, p-value: 0.1891
acf(en,lag=40)
pacf(en, lag=40)
y<-en-mean(en)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 52.185, df = 7, p-value = 5.368e-09
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 38.912, df = 7, p-value = 2.032e-06
library(FinTS)
library(vars)
library(ggplot2)
Warning in (function (kind = NULL, normal.kind = NULL, sample.kind = NULL) :
non-uniform 'Rounding' sampler used
Attaching package: ‘ggplot2’
The following objects are masked from ‘package:psych’:
%+%, alpha
t=ts(en,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 17.436, df = 1, p-value = 2.971e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 27.836, df = 2, p-value = 9.026e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 27.653, df = 3, p-value = 4.294e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 29.826, df = 4, p-value = 5.309e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 33.666, df = 5, p-value = 2.775e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 34.033, df = 6, p-value = 6.63e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 33.804, df = 7, p-value = 1.874e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 35.097, df = 8, p-value = 2.567e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 34.868, df = 9, p-value = 6.285e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 35.043, df = 10, p-value = 0.0001228
for (i in 1:10) print (grangertest(pol~ma, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(ma, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.4406 0.5076
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(ma, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.7798 0.4598
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(ma, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.6372 0.5919
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(ma, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.4301 0.7868
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(ma, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.7698 0.5725
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(ma, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.8935 0.5007
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(ma, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.92 0.4921
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(ma, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.8013 0.6021
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(ma, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.7512 0.6616
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(ma, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.6677 0.7534
fit<-lm(ma~pol)
summary(fit)
Call:
lm(formula = ma ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.154188 -0.028552 -0.002621 0.024139 0.206082
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.001559 0.004349 0.358 0.720
pol -0.020642 0.018031 -1.145 0.254
Residual standard error: 0.04178 on 211 degrees of freedom
Multiple R-squared: 0.006173, Adjusted R-squared: 0.001463
F-statistic: 1.311 on 1 and 211 DF, p-value: 0.2536
acf(ma,lag=40)
pacf(ma, lag=40)
y<-ma-mean(ma)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 63.448, df = 7, p-value = 3.082e-11
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 98.378, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
library(ggplot2)
t=ts(ma,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 3.1538, df = 1, p-value = 0.07575
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 6.9599, df = 2, p-value = 0.03081
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 27.42, df = 3, p-value = 4.807e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 35.51, df = 4, p-value = 3.649e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 41.117, df = 5, p-value = 8.885e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 44.041, df = 6, p-value = 7.255e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 50.131, df = 7, p-value = 1.361e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 52.025, df = 8, p-value = 1.664e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 52.203, df = 9, p-value = 4.138e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 52.203, df = 10, p-value = 1.046e-07
for (i in 1:10) print (grangertest(pol~ind, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(ind, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.1495 0.6994
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(ind, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.9451 0.3903
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(ind, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.7994 0.4955
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(ind, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.4891 0.7437
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(ind, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.7262 0.6046
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(ind, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.8404 0.5401
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(ind, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.8468 0.5499
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(ind, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.7841 0.6172
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(ind, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.7182 0.6918
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(ind, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.5784 0.8303
fit<-lm(ind~pol)
summary(fit)
Call:
lm(formula = ind ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.190087 -0.021578 0.001918 0.020241 0.150881
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.002316 0.004246 0.545 0.586
pol -0.024037 0.017606 -1.365 0.174
Residual standard error: 0.04079 on 211 degrees of freedom
Multiple R-squared: 0.008757, Adjusted R-squared: 0.004059
F-statistic: 1.864 on 1 and 211 DF, p-value: 0.1736
acf(ind,lag=40)
pacf(ind, lag=40)
y<-ind-mean(ind)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 89.141, df = 7, p-value = 2.22e-16
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 89.758, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
library(ggplot2)
t=ts(ind,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 27.338, df = 1, p-value = 1.708e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 31.346, df = 2, p-value = 1.561e-07
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 50.262, df = 3, p-value = 7.027e-11
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 52.366, df = 4, p-value = 1.157e-10
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 59.25, df = 5, p-value = 1.737e-11
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 60.426, df = 6, p-value = 3.687e-11
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 61.437, df = 7, p-value = 7.793e-11
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 74.621, df = 8, p-value = 5.875e-13
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 75.152, df = 9, p-value = 1.475e-12
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 75.107, df = 10, p-value = 4.534e-12
for (i in 1:10) print (grangertest(pol~cd, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(cd, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.3631 0.5474
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(cd, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.4237 0.6552
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(cd, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.2955 0.8286
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(cd, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.245 0.9124
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(cd, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.3313 0.8937
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(cd, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.3339 0.9185
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(cd, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.5269 0.8136
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(cd, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.5227 0.8385
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(cd, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.5273 0.8536
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(cd, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.4134 0.939
fit<-lm(cd~pol)
summary(fit)
Call:
lm(formula = cd ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.147963 -0.018973 -0.001356 0.016255 0.170098
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.004217 0.004111 1.026 0.3061
pol -0.031877 0.017045 -1.870 0.0628 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.0395 on 211 degrees of freedom
Multiple R-squared: 0.01631, Adjusted R-squared: 0.01164
F-statistic: 3.497 on 1 and 211 DF, p-value: 0.06285
acf(cd,lag=40)
pacf(cd, lag=40)
y<-cd-mean(cd)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 90.747, df = 7, p-value < 2.2e-16
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 104.69, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
library(ggplot2)
t=ts(cd,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 16.392, df = 1, p-value = 5.151e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 23.137, df = 2, p-value = 9.461e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 41.059, df = 3, p-value = 6.354e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 44.338, df = 4, p-value = 5.457e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 50.178, df = 5, p-value = 1.274e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 50.201, df = 6, p-value = 4.284e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 54.717, df = 7, p-value = 1.696e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 54.378, df = 8, p-value = 5.831e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 54.218, df = 9, p-value = 1.716e-08
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 53.909, df = 10, p-value = 5.045e-08
for (i in 1:10) print (grangertest(pol~cs, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(cs, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.2507 0.6171
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(cs, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.1488 0.8618
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(cs, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.4743 0.7005
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(cs, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.2697 0.8973
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(cs, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.2339 0.9473
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(cs, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.2728 0.9492
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(cs, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.3552 0.9269
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(cs, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.2654 0.9763
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(cs, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.2609 0.984
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(cs, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.2211 0.9941
fit<-lm(cs~pol)
summary(fit)
Call:
lm(formula = cs ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.12083 -0.01666 -0.00351 0.02123 0.07777
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.003670 0.003129 1.173 0.2421
pol -0.031695 0.012973 -2.443 0.0154 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.03006 on 211 degrees of freedom
Multiple R-squared: 0.02751, Adjusted R-squared: 0.0229
F-statistic: 5.969 on 1 and 211 DF, p-value: 0.01538
acf(cs,lag=40)
pacf(cs, lag=40)
y<-cs-mean(cs)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 48.017, df = 7, p-value = 3.534e-08
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 200.65, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
library(ggplot2)
t=ts(cs,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 10.869, df = 1, p-value = 0.0009781
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 15.822, df = 2, p-value = 0.0003666
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 28.32, df = 3, p-value = 3.111e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 28.144, df = 4, p-value = 1.166e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 30.499, df = 5, p-value = 1.176e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 30.466, df = 6, p-value = 3.204e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 31.091, df = 7, p-value = 5.98e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 30.958, df = 8, p-value = 0.000143
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 31.214, df = 9, p-value = 0.0002721
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 31.652, df = 10, p-value = 0.0004576
for (i in 1:10) print (grangertest(pol~hc, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(hc, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.4815 0.4885
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(hc, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.6605 0.5177
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(hc, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.7654 0.5146
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(hc, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.464 0.7621
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(hc, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.4955 0.7794
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(hc, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.4772 0.8248
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(hc, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.5921 0.7619
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(hc, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.5561 0.8128
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(hc, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.5173 0.8609
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(hc, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.4272 0.932
fit<-lm(hc~pol)
summary(fit)
Call:
lm(formula = hc ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.121851 -0.018235 0.002343 0.020451 0.118444
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.0007492 0.0035760 0.209 0.834
pol -0.0167225 0.0148274 -1.128 0.261
Residual standard error: 0.03436 on 211 degrees of freedom
Multiple R-squared: 0.005992, Adjusted R-squared: 0.001281
F-statistic: 1.272 on 1 and 211 DF, p-value: 0.2607
acf(hc,lag=40)
pacf(hc, lag=40)
y<-hc-mean(hc)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 48.794, df = 7, p-value = 2.49e-08
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 128.23, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
library(ggplot2)
t=ts(hc,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 5.563, df = 1, p-value = 0.01834
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 8.6873, df = 2, p-value = 0.01299
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 25.188, df = 3, p-value = 1.41e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 27.968, df = 4, p-value = 1.266e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 30.886, df = 5, p-value = 9.864e-06
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 31.433, df = 6, p-value = 2.095e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 32.923, df = 7, p-value = 2.737e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 32.809, df = 8, p-value = 6.665e-05
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 33.601, df = 9, p-value = 0.0001049
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 33.432, df = 10, p-value = 0.0002304
for (i in 1:10) print (grangertest(pol~fin, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(fin, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.2807 0.5968
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(fin, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.9536 0.387
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(fin, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.6405 0.5898
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(fin, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.4842 0.7473
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(fin, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.5802 0.7151
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(fin, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.7124 0.64
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(fin, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.7626 0.6193
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(fin, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.6878 0.702
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(fin, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.6175 0.7813
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(fin, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.4494 0.92
fit<-lm(fin~pol)
summary(fit)
Call:
lm(formula = fin ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.204117 -0.023338 -0.000496 0.026362 0.207442
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.001882 0.004576 0.411 0.681
pol -0.020664 0.018973 -1.089 0.277
Residual standard error: 0.04396 on 211 degrees of freedom
Multiple R-squared: 0.005591, Adjusted R-squared: 0.0008777
F-statistic: 1.186 on 1 and 211 DF, p-value: 0.2773
acf(fin,lag=40)
pacf(fin, lag=40)
y<-fin-mean(fin)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 85.408, df = 7, p-value = 1.11e-15
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 75.819, df = 7, p-value = 9.781e-14
library(FinTS)
library(vars)
library(ggplot2)
t=ts(fin,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 12.146, df = 1, p-value = 0.000492
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 15.002, df = 2, p-value = 0.0005525
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 60.931, df = 3, p-value = 3.717e-13
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 63.133, df = 4, p-value = 6.362e-13
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 64.61, df = 5, p-value = 1.35e-12
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 64.627, df = 6, p-value = 5.142e-12
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 64.609, df = 7, p-value = 1.802e-11
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 77.851, df = 8, p-value = 1.322e-13
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 79.893, df = 9, p-value = 1.697e-13
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 80.056, df = 10, p-value = 4.896e-13
for (i in 1:10) print (grangertest(pol~comm, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(comm, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.1398 0.7089
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(comm, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.1023 0.9028
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(comm, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.2337 0.8728
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(comm, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.1484 0.9635
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(comm, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.1991 0.9625
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(comm, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.2132 0.9723
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(comm, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.2234 0.9795
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(comm, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.2773 0.9727
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(comm, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.3337 0.9629
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(comm, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.323 0.9743
fit<-lm(comm~pol)
summary(fit)
Call:
lm(formula = comm ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.131159 -0.022244 0.001527 0.020080 0.129583
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.004000 0.003734 1.071 0.2853
pol -0.028919 0.015482 -1.868 0.0632 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.03587 on 211 degrees of freedom
Multiple R-squared: 0.01627, Adjusted R-squared: 0.0116
F-statistic: 3.489 on 1 and 211 DF, p-value: 0.06317
acf(comm,lag=40)
pacf(comm, lag=40)
y<-comm-mean(comm)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 36.527, df = 7, p-value = 5.764e-06
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 127.28, df = 7, p-value < 2.2e-16
library(FinTS)
library(vars)
library(ggplot2)
t=ts(comm,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 2.4638, df = 1, p-value = 0.1165
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 4.5589, df = 2, p-value = 0.1023
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 21.097, df = 3, p-value = 0.0001005
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 22.841, df = 4, p-value = 0.0001362
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 24.884, df = 5, p-value = 0.0001467
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 25.869, df = 6, p-value = 0.0002355
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 27.924, df = 7, p-value = 0.0002269
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 29.637, df = 8, p-value = 0.0002449
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 30.653, df = 9, p-value = 0.0003395
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 30.65, df = 10, p-value = 0.0006701
for (i in 1:10) print (grangertest(pol~ut, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(ut, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.3878 0.5341
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(ut, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.1976 0.8208
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(ut, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.4604 0.7102
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(ut, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.3527 0.842
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(ut, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.3096 0.9068
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(ut, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.5603 0.7616
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(ut, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.5047 0.8303
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(ut, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.4729 0.8743
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(ut, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.5325 0.8497
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(ut, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.5002 0.8884
fit<-lm(ut~pol)
summary(fit)
Call:
lm(formula = ut ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.185524 -0.017626 -0.001414 0.018584 0.184169
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.0003549 0.0038237 0.093 0.926
pol -0.0156023 0.0158543 -0.984 0.326
Residual standard error: 0.03674 on 211 degrees of freedom
Multiple R-squared: 0.004569, Adjusted R-squared: -0.0001488
F-statistic: 0.9685 on 1 and 211 DF, p-value: 0.3262
acf(ut,lag=40)
pacf(ut, lag=40)
y<-ut-mean(ut)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 136.36, df = 7, p-value < 2.2e-16
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 65.305, df = 7, p-value = 1.306e-11
library(FinTS)
library(vars)
library(ggplot2)
t=ts(ut,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 34.344, df = 1, p-value = 4.618e-09
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 43.534, df = 2, p-value = 3.521e-10
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 67.354, df = 3, p-value = 1.573e-14
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 67.814, df = 4, p-value = 6.565e-14
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 86.535, df = 5, p-value < 2.2e-16
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 86.124, df = 6, p-value < 2.2e-16
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 86.443, df = 7, p-value = 6.639e-16
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 93.023, df = 8, p-value < 2.2e-16
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 92.533, df = 9, p-value = 5.046e-16
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 92.196, df = 10, p-value = 1.963e-15
for (i in 1:10) print (grangertest(pol~re, order=i))
Granger causality test
Model 1: pol ~ Lags(pol, 1:1) + Lags(re, 1:1)
Model 2: pol ~ Lags(pol, 1:1)
Res.Df Df F Pr(>F)
1 209
2 210 -1 0.0732 0.7869
Granger causality test
Model 1: pol ~ Lags(pol, 1:2) + Lags(re, 1:2)
Model 2: pol ~ Lags(pol, 1:2)
Res.Df Df F Pr(>F)
1 206
2 208 -2 0.1254 0.8822
Granger causality test
Model 1: pol ~ Lags(pol, 1:3) + Lags(re, 1:3)
Model 2: pol ~ Lags(pol, 1:3)
Res.Df Df F Pr(>F)
1 203
2 206 -3 0.0819 0.9698
Granger causality test
Model 1: pol ~ Lags(pol, 1:4) + Lags(re, 1:4)
Model 2: pol ~ Lags(pol, 1:4)
Res.Df Df F Pr(>F)
1 200
2 204 -4 0.1103 0.9788
Granger causality test
Model 1: pol ~ Lags(pol, 1:5) + Lags(re, 1:5)
Model 2: pol ~ Lags(pol, 1:5)
Res.Df Df F Pr(>F)
1 197
2 202 -5 0.1867 0.9674
Granger causality test
Model 1: pol ~ Lags(pol, 1:6) + Lags(re, 1:6)
Model 2: pol ~ Lags(pol, 1:6)
Res.Df Df F Pr(>F)
1 194
2 200 -6 0.2523 0.9579
Granger causality test
Model 1: pol ~ Lags(pol, 1:7) + Lags(re, 1:7)
Model 2: pol ~ Lags(pol, 1:7)
Res.Df Df F Pr(>F)
1 191
2 198 -7 0.224 0.9793
Granger causality test
Model 1: pol ~ Lags(pol, 1:8) + Lags(re, 1:8)
Model 2: pol ~ Lags(pol, 1:8)
Res.Df Df F Pr(>F)
1 188
2 196 -8 0.2939 0.9674
Granger causality test
Model 1: pol ~ Lags(pol, 1:9) + Lags(re, 1:9)
Model 2: pol ~ Lags(pol, 1:9)
Res.Df Df F Pr(>F)
1 185
2 194 -9 0.3037 0.9729
Granger causality test
Model 1: pol ~ Lags(pol, 1:10) + Lags(re, 1:10)
Model 2: pol ~ Lags(pol, 1:10)
Res.Df Df F Pr(>F)
1 182
2 192 -10 0.2273 0.9934
fit<-lm(re~pol)
summary(fit)
Call:
lm(formula = re ~ pol)
Residuals:
Min 1Q Median 3Q Max
-0.286522 -0.020616 -0.002014 0.018641 0.226806
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.002291 0.004480 0.511 0.61
pol -0.024415 0.018577 -1.314 0.19
Residual standard error: 0.04305 on 211 degrees of freedom
Multiple R-squared: 0.008119, Adjusted R-squared: 0.003418
F-statistic: 1.727 on 1 and 211 DF, p-value: 0.1902
acf(re,lag=40)
pacf(re, lag=40)
y<-re-mean(re)
Box.test(y^2,lag=7,type = "Ljung")
Box-Ljung test
data: y^2
X-squared = 80.595, df = 7, p-value = 1.044e-14
Box.test(y,lag=7,type = "Ljung")
Box-Ljung test
data: y
X-squared = 42.837, df = 7, p-value = 3.587e-07
library(FinTS)
library(vars)
library(ggplot2)
t=ts(re,start=c(2017,40),frequency = 52)
plot(t, col=4, pch=8, lwd=2)
for (i in 1:10) print(ArchTest(t, lag=i))
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 11.421, df = 1, p-value = 0.0007263
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 12.433, df = 2, p-value = 0.001996
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 66.098, df = 3, p-value = 2.921e-14
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 71.791, df = 4, p-value = 9.5e-15
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 71.487, df = 5, p-value = 5.024e-14
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 79.698, df = 6, p-value = 4.125e-15
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 81.112, df = 7, p-value = 8.17e-15
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 83.309, df = 8, p-value = 1.052e-14
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 83.534, df = 9, p-value = 3.2e-14
ARCH LM-test; Null hypothesis: no ARCH effects
data: t
Chi-squared = 83.142, df = 10, p-value = 1.213e-13
VARselect(tech, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
4 3 2 4
$criteria
1 2 3 4 5 6 7
AIC(n) -6.599640155 -6.685519806 -6.695083151 -6.700733255 -6.690882235 -6.694817893 -6.694208955
HQ(n) -6.593037244 -6.672313985 -6.675274420 -6.674321613 -6.657867682 -6.655200430 -6.647988581
SC(n) -6.583318943 -6.652877382 -6.646119516 -6.635448408 -6.609276176 -6.596890622 -6.579960473
FPE(n) 0.001360858 0.001248866 0.001236982 0.001230016 0.001242199 0.001237328 0.001238095
8 9 10
AIC(n) -6.695657379 -6.694732033 -6.686944719
HQ(n) -6.642834095 -6.635305838 -6.620915614
SC(n) -6.565087685 -6.547841127 -6.523732602
FPE(n) 0.001236319 0.001237485 0.001247187
VARselect(en, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
2 2 2 2
$criteria
1 2 3 4 5 6 7
AIC(n) -5.80640697 -5.8570392 -5.847297823 -5.843944253 -5.83509676 -5.826567123 -5.817805520
HQ(n) -5.79980406 -5.8438334 -5.827489091 -5.817532611 -5.80208221 -5.786949660 -5.771585146
SC(n) -5.79008576 -5.8243968 -5.798334187 -5.778659406 -5.75349070 -5.728639853 -5.703557038
FPE(n) 0.00300822 0.0028597 0.002887698 0.002897407 0.00292317 0.002948231 0.002974206
8 9 10
AIC(n) -5.852668214 -5.843004849 -5.842216846
HQ(n) -5.799844930 -5.783578654 -5.776187741
SC(n) -5.722098520 -5.696113943 -5.679004729
FPE(n) 0.002872343 0.002900284 0.002902633
VARselect(ma, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 2 2 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.378095320 -6.467524565 -6.462803588 -6.458433445 -6.45698899 -6.452071017 -6.468328089
HQ(n) -6.371492410 -6.454318744 -6.442994857 -6.432021803 -6.42397444 -6.412453554 -6.422107716
SC(n) -6.361774108 -6.434882142 -6.413839953 -6.393148599 -6.37538293 -6.354143747 -6.354079607
FPE(n) 0.001698355 0.001553066 0.001560418 0.001567257 0.00156953 0.001577279 0.001551861
8 9 10
AIC(n) -6.497126432 -6.487798831 -6.478971253
HQ(n) -6.444303148 -6.428372636 -6.412942148
SC(n) -6.366556738 -6.340907925 -6.315759136
FPE(n) 0.001507827 0.001521984 0.001535512
VARselect(ind, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 2 2 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.411360255 -6.520707938 -6.51298923 -6.503690454 -6.50187333 -6.517352393 -6.515170665
HQ(n) -6.404757345 -6.507502117 -6.49318050 -6.477278812 -6.46885878 -6.477734930 -6.468950291
SC(n) -6.395039043 -6.488065515 -6.46402560 -6.438405607 -6.42026727 -6.419425122 -6.400922183
FPE(n) 0.001642789 0.001472627 0.00148404 0.001497909 0.00150064 0.001477601 0.001480844
8 9 10
AIC(n) -6.551108768 -6.541458125 -6.533733210
HQ(n) -6.498285484 -6.482031930 -6.467704105
SC(n) -6.420539074 -6.394567219 -6.370521092
FPE(n) 0.001428589 0.001442468 0.001453685
VARselect(cd, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 2 2 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.485421951 -6.594877071 -6.595095947 -6.585620309 -6.584481941 -6.59957499 -6.596446418
HQ(n) -6.478819040 -6.581671250 -6.575287216 -6.559208667 -6.551467389 -6.55995753 -6.550226044
SC(n) -6.469100739 -6.562234647 -6.546132312 -6.520335462 -6.502875883 -6.50164772 -6.482197936
FPE(n) 0.001525517 0.001367356 0.001367059 0.001380078 0.001381657 0.00136097 0.001365248
8 9 10
AIC(n) -6.600010427 -6.593272324 -6.585515021
HQ(n) -6.547187143 -6.533846130 -6.519485916
SC(n) -6.469440734 -6.446381419 -6.422302903
FPE(n) 0.001360409 0.001369631 0.001380327
VARselect(cs, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 6 3 8
$criteria
1 2 3 4 5 6
AIC(n) -7.0762774656 -7.1416169000 -7.2082644762 -7.2172292963 -7.2239443776 -7.2354861093
HQ(n) -7.0696745551 -7.1284110790 -7.1884557447 -7.1908176543 -7.1909298251 -7.1958686463
SC(n) -7.0599562538 -7.1089744766 -7.1593008410 -7.1519444494 -7.1423383190 -7.1375588390
FPE(n) 0.0008449126 0.0007914718 0.0007404427 0.0007338366 0.0007289289 0.0007205694
7 8 9 10
AIC(n) -7.240999110 -7.2427257897 -7.2332520937 -7.2336997817
HQ(n) -7.194778737 -7.1899025057 -7.1738258992 -7.1676706767
SC(n) -7.126750628 -7.1121560959 -7.0863611882 -7.0704876645
FPE(n) 0.000716615 0.0007153884 0.0007222105 0.0007219029
VARselect(hc, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
9 4 3 9
$criteria
1 2 3 4 5 6 7
AIC(n) -6.763383578 -6.841833895 -6.866545937 -6.877295167 -6.870203996 -6.888235903 -6.892473039
HQ(n) -6.756780667 -6.828628074 -6.846737206 -6.850883525 -6.837189443 -6.848618440 -6.846252665
SC(n) -6.747062366 -6.809191472 -6.817582302 -6.812010320 -6.788597937 -6.790308633 -6.778224556
FPE(n) 0.001155314 0.001068143 0.001042072 0.001030934 0.001038276 0.001019729 0.001015427
8 9 10
AIC(n) -6.891539759 -6.893107339 -6.884530411
HQ(n) -6.838716475 -6.833681144 -6.818501306
SC(n) -6.760970065 -6.746216433 -6.721318294
FPE(n) 0.001016389 0.001014815 0.001023578
VARselect(fin, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 8 2 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.246658422 -6.353588269 -6.345617343 -6.336697437 -6.338303585 -6.341009417 -6.345463985
HQ(n) -6.240055512 -6.340382448 -6.325808612 -6.310285795 -6.305289033 -6.301391954 -6.299243612
SC(n) -6.230337211 -6.320945846 -6.296653708 -6.271412590 -6.256697527 -6.243082147 -6.231215503
FPE(n) 0.001936916 0.001740492 0.001754423 0.001770148 0.001767315 0.001762553 0.001754736
8 9 10
AIC(n) -6.409237885 -6.40018322 -6.390721664
HQ(n) -6.356414601 -6.34075702 -6.324692559
SC(n) -6.278668191 -6.25329231 -6.227509547
FPE(n) 0.001646346 0.00166135 0.001677179
VARselect(comm, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 2 2 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.701076188 -6.81954366 -6.82201101 -6.826710043 -6.821045919 -6.822002058 -6.817714070
HQ(n) -6.694473277 -6.80633784 -6.80220228 -6.800298401 -6.788031366 -6.782384595 -6.771493697
SC(n) -6.684754976 -6.78690123 -6.77304738 -6.761425196 -6.739439860 -6.724074787 -6.703465588
FPE(n) 0.001229588 0.00109222 0.00108953 0.001084425 0.001090591 0.001089556 0.001094249
8 9 10
AIC(n) -6.84624970 -6.836398339 -6.827828839
HQ(n) -6.79342642 -6.776972145 -6.761799734
SC(n) -6.71568001 -6.689507434 -6.664616722
FPE(n) 0.00106348 0.001074027 0.001083294
VARselect(ut, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 8 3 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.590177756 -6.649107349 -6.676626743 -6.672288026 -6.683586342 -6.694631309 -6.702009586
HQ(n) -6.583574845 -6.635901528 -6.656818012 -6.645876384 -6.650571790 -6.655013846 -6.655789212
SC(n) -6.573856544 -6.616464926 -6.627663108 -6.607003179 -6.601980284 -6.596704039 -6.587761104
FPE(n) 0.001373796 0.001295179 0.001260024 0.001265506 0.001251295 0.001237559 0.001228474
8 9 10
AIC(n) -6.710673057 -6.704362270 -6.6956311
HQ(n) -6.657849773 -6.644936076 -6.6296020
SC(n) -6.580103364 -6.557471365 -6.5324190
FPE(n) 0.001217894 0.001225625 0.0012364
VARselect(re, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
8 8 2 8
$criteria
1 2 3 4 5 6 7
AIC(n) -6.246371189 -6.316398569 -6.315225207 -6.306909965 -6.3047614 -6.319084325 -6.313896946
HQ(n) -6.239768278 -6.303192748 -6.295416475 -6.280498323 -6.2717469 -6.279466862 -6.267676573
SC(n) -6.230049977 -6.283756145 -6.266261571 -6.241625118 -6.2231554 -6.221157055 -6.199648464
FPE(n) 0.001937472 0.001806439 0.001808562 0.001823669 0.0018276 0.001801623 0.001811012
8 9 10
AIC(n) -6.386899805 -6.378811268 -6.369052534
HQ(n) -6.334076521 -6.319385073 -6.303023429
SC(n) -6.256330111 -6.231920362 -6.205840417
FPE(n) 0.001683536 0.001697238 0.001713919
VARselect(pol, lag.max = 10, type="none")
$selection
AIC(n) HQ(n) SC(n) FPE(n)
6 5 5 6
$criteria
1 2 3 4 5 6 7
AIC(n) -3.24008226 -3.33253316 -3.4318764 -3.54303466 -3.58386513 -3.5895294 -3.58402978
HQ(n) -3.23347935 -3.31932734 -3.4120677 -3.51662302 -3.55085057 -3.5499120 -3.53780940
SC(n) -3.22376105 -3.29989074 -3.3829128 -3.47774981 -3.50225907 -3.4916022 -3.46978130
FPE(n) 0.03916068 0.03570257 0.0323263 0.02892556 0.02776844 0.0276118 0.02776435
8 9 10
AIC(n) -3.57738168 -3.56909927 -3.58781771
HQ(n) -3.52455840 -3.50967308 -3.52178861
SC(n) -3.44681199 -3.42220837 -3.42460559
FPE(n) 0.02794992 0.02818287 0.02766083
bds.test(tech,m=6)
BDS Test
data: tech
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0188 0.0376 0.0564 0.0751
Standard Normal =
[ 0.0188 ] [ 0.0376 ] [ 0.0564 ] [ 0.0751 ]
[ 2 ] 4.3073 3.7570 3.0208 2.1918
[ 3 ] 6.8421 5.5164 4.4238 3.2933
[ 4 ] 8.5396 6.9402 5.0585 4.1258
[ 5 ] 11.7935 8.3123 5.9225 4.7955
[ 6 ] 14.6476 9.3741 6.4815 5.1022
p-value =
[ 0.0188 ] [ 0.0376 ] [ 0.0564 ] [ 0.0751 ]
[ 2 ] 0 2e-04 0.0025 0.0284
[ 3 ] 0 0e+00 0.0000 0.0010
[ 4 ] 0 0e+00 0.0000 0.0000
[ 5 ] 0 0e+00 0.0000 0.0000
[ 6 ] 0 0e+00 0.0000 0.0000
bds.test(en,m=6)
BDS Test
data: en
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0275 0.0550 0.0825 0.1099
Standard Normal =
[ 0.0275 ] [ 0.055 ] [ 0.0825 ] [ 0.1099 ]
[ 2 ] 5.6336 4.6107 2.9635 2.7348
[ 3 ] 6.8543 5.5216 4.2903 3.9674
[ 4 ] 8.8546 6.1795 4.8497 4.3153
[ 5 ] 12.8195 7.4922 5.7144 4.7542
[ 6 ] 16.9284 9.0431 6.5172 4.9545
p-value =
[ 0.0275 ] [ 0.055 ] [ 0.0825 ] [ 0.1099 ]
[ 2 ] 0 0 0.003 0.0062
[ 3 ] 0 0 0.000 0.0001
[ 4 ] 0 0 0.000 0.0000
[ 5 ] 0 0 0.000 0.0000
[ 6 ] 0 0 0.000 0.0000
bds.test(ma,m=6)
BDS Test
data: ma
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0209 0.0418 0.0627 0.0836
Standard Normal =
[ 0.0209 ] [ 0.0418 ] [ 0.0627 ] [ 0.0836 ]
[ 2 ] 6.5956 3.8524 2.5450 1.8540
[ 3 ] 9.7417 5.9028 3.9817 3.2555
[ 4 ] 14.2576 7.3199 4.8114 3.9019
[ 5 ] 20.3202 9.3569 5.8011 4.4541
[ 6 ] 26.8134 11.2531 6.4861 4.7604
p-value =
[ 0.0209 ] [ 0.0418 ] [ 0.0627 ] [ 0.0836 ]
[ 2 ] 0 1e-04 0.0109 0.0637
[ 3 ] 0 0e+00 0.0001 0.0011
[ 4 ] 0 0e+00 0.0000 0.0001
[ 5 ] 0 0e+00 0.0000 0.0000
[ 6 ] 0 0e+00 0.0000 0.0000
bds.test(ind,m=6)
BDS Test
data: ind
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0204 0.0409 0.0613 0.0818
Standard Normal =
[ 0.0204 ] [ 0.0409 ] [ 0.0613 ] [ 0.0818 ]
[ 2 ] 6.9644 5.3375 4.4242 4.2088
[ 3 ] 10.0573 6.7339 5.9018 6.0307
[ 4 ] 12.3883 7.5762 6.3543 6.5061
[ 5 ] 15.6404 8.7977 6.7434 6.5847
[ 6 ] 20.7916 10.1281 7.2538 6.6099
p-value =
[ 0.0204 ] [ 0.0409 ] [ 0.0613 ] [ 0.0818 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
[ 4 ] 0 0 0 0
[ 5 ] 0 0 0 0
[ 6 ] 0 0 0 0
bds.test(cd,m=6)
BDS Test
data: cd
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0199 0.0397 0.0596 0.0795
Standard Normal =
[ 0.0199 ] [ 0.0397 ] [ 0.0596 ] [ 0.0795 ]
[ 2 ] 4.1952 3.7464 3.5571 4.3165
[ 3 ] 7.0859 5.2707 5.0047 5.6576
[ 4 ] 10.2418 6.4257 5.5102 5.9046
[ 5 ] 14.2623 7.3433 6.1492 6.0718
[ 6 ] 20.0176 8.7365 6.9497 6.3857
p-value =
[ 0.0199 ] [ 0.0397 ] [ 0.0596 ] [ 0.0795 ]
[ 2 ] 0 2e-04 4e-04 0
[ 3 ] 0 0e+00 0e+00 0
[ 4 ] 0 0e+00 0e+00 0
[ 5 ] 0 0e+00 0e+00 0
[ 6 ] 0 0e+00 0e+00 0
bds.test(cs,m=6)
BDS Test
data: cs
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0152 0.0304 0.0456 0.0608
Standard Normal =
[ 0.0152 ] [ 0.0304 ] [ 0.0456 ] [ 0.0608 ]
[ 2 ] 15.4246 11.1099 7.3970 5.3153
[ 3 ] 19.9538 14.1453 8.9561 6.3781
[ 4 ] 25.8421 17.1254 10.1523 6.8428
[ 5 ] 31.4883 20.5790 11.4554 7.2502
[ 6 ] 39.0718 24.8860 12.8193 7.6001
p-value =
[ 0.0152 ] [ 0.0304 ] [ 0.0456 ] [ 0.0608 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
[ 4 ] 0 0 0 0
[ 5 ] 0 0 0 0
[ 6 ] 0 0 0 0
bds.test(hc,m=6)
BDS Test
data: hc
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0172 0.0344 0.0516 0.0688
Standard Normal =
[ 0.0172 ] [ 0.0344 ] [ 0.0516 ] [ 0.0688 ]
[ 2 ] 2.8875 2.7583 2.6512 2.8245
[ 3 ] 5.5335 5.0763 4.3434 3.9641
[ 4 ] 7.8928 6.7109 5.2683 4.6072
[ 5 ] 10.7680 8.1315 6.0884 5.1462
[ 6 ] 15.5564 9.2856 6.7604 5.4808
p-value =
[ 0.0172 ] [ 0.0344 ] [ 0.0516 ] [ 0.0688 ]
[ 2 ] 0.0039 0.0058 0.008 0.0047
[ 3 ] 0.0000 0.0000 0.000 0.0001
[ 4 ] 0.0000 0.0000 0.000 0.0000
[ 5 ] 0.0000 0.0000 0.000 0.0000
[ 6 ] 0.0000 0.0000 0.000 0.0000
bds.test(fin,m=6)
BDS Test
data: fin
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.022 0.044 0.066 0.088
Standard Normal =
[ 0.022 ] [ 0.044 ] [ 0.066 ] [ 0.088 ]
[ 2 ] 9.6838 7.0539 5.6429 5.1641
[ 3 ] 13.2533 8.1357 6.5046 6.1552
[ 4 ] 18.8189 8.6642 6.5277 6.4012
[ 5 ] 26.4450 9.7797 6.7423 6.4490
[ 6 ] 37.3284 11.0365 7.1164 6.4596
p-value =
[ 0.022 ] [ 0.044 ] [ 0.066 ] [ 0.088 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
[ 4 ] 0 0 0 0
[ 5 ] 0 0 0 0
[ 6 ] 0 0 0 0
bds.test(comm,m=6)
BDS Test
data: comm
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0180 0.0361 0.0541 0.0722
Standard Normal =
[ 0.018 ] [ 0.0361 ] [ 0.0541 ] [ 0.0722 ]
[ 2 ] 4.6993 3.7933 2.7026 1.8338
[ 3 ] 7.7069 6.3718 4.3887 3.0775
[ 4 ] 9.6734 7.9526 5.3240 3.8407
[ 5 ] 13.1461 9.2357 6.1240 4.3086
[ 6 ] 19.0145 10.8972 6.8648 4.6756
p-value =
[ 0.018 ] [ 0.0361 ] [ 0.0541 ] [ 0.0722 ]
[ 2 ] 0 1e-04 0.0069 0.0667
[ 3 ] 0 0e+00 0.0000 0.0021
[ 4 ] 0 0e+00 0.0000 0.0001
[ 5 ] 0 0e+00 0.0000 0.0000
[ 6 ] 0 0e+00 0.0000 0.0000
bds.test(ut,m=6)
BDS Test
data: ut
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0184 0.0367 0.0551 0.0735
Standard Normal =
[ 0.0184 ] [ 0.0367 ] [ 0.0551 ] [ 0.0735 ]
[ 2 ] 8.2892 7.7415 6.9753 6.0097
[ 3 ] 9.8500 8.8676 7.6704 7.1128
[ 4 ] 11.8353 9.8050 7.9362 7.1255
[ 5 ] 15.6249 11.7344 8.4361 7.0017
[ 6 ] 21.2882 13.6143 8.8106 6.9242
p-value =
[ 0.0184 ] [ 0.0367 ] [ 0.0551 ] [ 0.0735 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
[ 4 ] 0 0 0 0
[ 5 ] 0 0 0 0
[ 6 ] 0 0 0 0
bds.test(re,m=6)
BDS Test
data: re
Embedding dimension = 2 3 4 5 6
Epsilon for close points = 0.0216 0.0431 0.0647 0.0862
Standard Normal =
[ 0.0216 ] [ 0.0431 ] [ 0.0647 ] [ 0.0862 ]
[ 2 ] 5.0699 4.7584 4.5784 4.1258
[ 3 ] 6.7665 6.0292 5.4322 5.6262
[ 4 ] 8.0530 6.7096 5.4165 5.7644
[ 5 ] 10.5290 8.0503 5.7222 5.6455
[ 6 ] 12.9868 9.5043 6.2484 5.6345
p-value =
[ 0.0216 ] [ 0.0431 ] [ 0.0647 ] [ 0.0862 ]
[ 2 ] 0 0 0 0
[ 3 ] 0 0 0 0
[ 4 ] 0 0 0 0
[ 5 ] 0 0 0 0
[ 6 ] 0 0 0 0
library(quantreg)
library(KernSmooth)
library(vars)
library(np)
library(ggplot2) # for graphin
library(openxlsx) # to read Excel xlsx files
source('/Users/taozheng/lrq_causality_functions_v2.R')
quantiles at which th statistics is computed
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=tech, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.01750192
t-stat = 0.6958707 at qunatile 0.05
t-stat = 0.8504491 at qunatile 0.1
t-stat = 1.484963 at qunatile 0.15
t-stat = 1.577501 at qunatile 0.2
t-stat = 2.102183 at qunatile 0.25
t-stat = 2.189353 at qunatile 0.3
t-stat = 2.680321 at qunatile 0.35
t-stat = 3.046062 at qunatile 0.4
t-stat = 3.190521 at qunatile 0.45
t-stat = 3.095796 at qunatile 0.5
t-stat = 3.061479 at qunatile 0.55
t-stat = 2.660547 at qunatile 0.6
t-stat = 2.555728 at qunatile 0.65
t-stat = 3.763514 at qunatile 0.7
t-stat = 2.977194 at qunatile 0.75
t-stat = 1.888269 at qunatile 0.8
t-stat = 1.556403 at qunatile 0.85
t-stat = 1.440535 at qunatile 0.9
t-stat = 0.4835074 at qunatile 0.95
print(res.mean)
$stat
[1] 0.6958707 0.8504491 1.4849632 1.5775011 2.1021829 2.1893530 2.6803208 3.0460616 3.1905215
[10] 3.0957958 3.0614787 2.6605469 2.5557282 3.7635137 2.9771940 1.8882689 1.5564030 1.4405346
[19] 0.4835074
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=tech, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.01750192
t-stat = 0.420221 at qunatile 0.05
t-stat = 0.7189449 at qunatile 0.1
t-stat = 0.5711399 at qunatile 0.15
t-stat = 0.7730545 at qunatile 0.2
t-stat = 0.6539844 at qunatile 0.25
t-stat = 0.8061895 at qunatile 0.3
t-stat = 0.9643048 at qunatile 0.35
t-stat = 1.007349 at qunatile 0.4
t-stat = 1.032276 at qunatile 0.45
t-stat = 0.9935701 at qunatile 0.5
t-stat = 1.048438 at qunatile 0.55
t-stat = 0.9991038 at qunatile 0.6
t-stat = 0.8235845 at qunatile 0.65
t-stat = 1.060251 at qunatile 0.7
t-stat = 1.33381 at qunatile 0.75
t-stat = 0.9384193 at qunatile 0.8
t-stat = 0.758543 at qunatile 0.85
t-stat = 0.476649 at qunatile 0.9
t-stat = 0.2377377 at qunatile 0.95
print(res.variance)
$stat
[1] 0.4202210 0.7189449 0.5711399 0.7730545 0.6539844 0.8061895 0.9643048 1.0073485 1.0322759
[10] 0.9935701 1.0484377 0.9991038 0.8235845 1.0602508 1.3338104 0.9384193 0.7585430 0.4766490
[19] 0.2377377
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=en, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.02570871
t-stat = 0.2108524 at qunatile 0.05
t-stat = 0.4758145 at qunatile 0.1
t-stat = 0.5024279 at qunatile 0.15
t-stat = 0.5420345 at qunatile 0.2
t-stat = 0.8897515 at qunatile 0.25
t-stat = 0.8386236 at qunatile 0.3
t-stat = 1.086636 at qunatile 0.35
t-stat = 1.787441 at qunatile 0.4
t-stat = 2.20887 at qunatile 0.45
t-stat = 1.89483 at qunatile 0.5
t-stat = 2.284371 at qunatile 0.55
t-stat = 1.875356 at qunatile 0.6
t-stat = 2.205439 at qunatile 0.65
t-stat = 1.932728 at qunatile 0.7
t-stat = 2.062804 at qunatile 0.75
t-stat = 2.044885 at qunatile 0.8
t-stat = 1.24754 at qunatile 0.85
t-stat = 0.9556534 at qunatile 0.9
t-stat = 0.3846602 at qunatile 0.95
print(res.mean)
$stat
[1] 0.2108524 0.4758145 0.5024279 0.5420345 0.8897515 0.8386236 1.0866361 1.7874415 2.2088699
[10] 1.8948303 2.2843714 1.8753562 2.2054393 1.9327277 2.0628035 2.0448851 1.2475397 0.9556534
[19] 0.3846602
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=en, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.02570871
t-stat = 0.4859142 at qunatile 0.05
t-stat = 1.254671 at qunatile 0.1
t-stat = 0.9683957 at qunatile 0.15
t-stat = 1.154406 at qunatile 0.2
t-stat = 0.9149923 at qunatile 0.25
t-stat = 0.9744804 at qunatile 0.3
t-stat = 0.7160011 at qunatile 0.35
t-stat = 0.9336448 at qunatile 0.4
t-stat = 1.045351 at qunatile 0.45
t-stat = 1.040419 at qunatile 0.5
t-stat = 1.548849 at qunatile 0.55
t-stat = 1.329507 at qunatile 0.6
t-stat = 1.13389 at qunatile 0.65
t-stat = 1.395208 at qunatile 0.7
t-stat = 1.195828 at qunatile 0.75
t-stat = 1.048644 at qunatile 0.8
t-stat = 0.8182177 at qunatile 0.85
t-stat = 0.6021882 at qunatile 0.9
t-stat = 0.3572943 at qunatile 0.95
print(res.variance)
$stat
[1] 0.4859142 1.2546712 0.9683957 1.1544062 0.9149923 0.9744804 0.7160011 0.9336448 1.0453514
[10] 1.0404189 1.5488488 1.3295071 1.1338899 1.3952077 1.1958284 1.0486443 0.8182177 0.6021882
[19] 0.3572943
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
NA
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=ma, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.01824841
t-stat = 0.3974175 at qunatile 0.05
t-stat = 0.4990818 at qunatile 0.1
t-stat = 0.5556074 at qunatile 0.15
t-stat = 0.6125371 at qunatile 0.2
t-stat = 0.9010237 at qunatile 0.25
t-stat = 0.944736 at qunatile 0.3
t-stat = 1.206363 at qunatile 0.35
t-stat = 1.28361 at qunatile 0.4
t-stat = 1.277225 at qunatile 0.45
t-stat = 1.370358 at qunatile 0.5
t-stat = 1.542099 at qunatile 0.55
t-stat = 1.519369 at qunatile 0.6
t-stat = 1.380167 at qunatile 0.65
t-stat = 0.9108488 at qunatile 0.7
t-stat = 1.058268 at qunatile 0.75
t-stat = 1.211427 at qunatile 0.8
t-stat = 0.9947395 at qunatile 0.85
t-stat = 0.6862337 at qunatile 0.9
t-stat = 0.3519183 at qunatile 0.95
print(res.mean)
$stat
[1] 0.3974175 0.4990818 0.5556074 0.6125371 0.9010237 0.9447360 1.2063627 1.2836099 1.2772246
[10] 1.3703582 1.5420990 1.5193695 1.3801674 0.9108488 1.0582683 1.2114270 0.9947395 0.6862337
[19] 0.3519183
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=ma, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.01824841
t-stat = 0.6311426 at qunatile 0.05
t-stat = 0.4722228 at qunatile 0.1
t-stat = 0.6162057 at qunatile 0.15
t-stat = 0.5532884 at qunatile 0.2
t-stat = 0.4374907 at qunatile 0.25
t-stat = 0.5052066 at qunatile 0.3
t-stat = 0.6975039 at qunatile 0.35
t-stat = 0.913083 at qunatile 0.4
t-stat = 0.7080116 at qunatile 0.45
t-stat = 0.6725338 at qunatile 0.5
t-stat = 0.5959637 at qunatile 0.55
t-stat = 0.7323114 at qunatile 0.6
t-stat = 0.6427023 at qunatile 0.65
t-stat = 0.5546127 at qunatile 0.7
t-stat = 0.3984411 at qunatile 0.75
t-stat = 0.6231781 at qunatile 0.8
t-stat = 0.5215173 at qunatile 0.85
t-stat = 0.3065102 at qunatile 0.9
t-stat = 0.2961736 at qunatile 0.95
print(res.variance)
$stat
[1] 0.6311426 0.4722228 0.6162057 0.5532884 0.4374907 0.5052066 0.6975039 0.9130830 0.7080116
[10] 0.6725338 0.5959637 0.7323114 0.6427023 0.5546127 0.3984411 0.6231781 0.5215173 0.3065102
[19] 0.2961736
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=ind, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.01635507
t-stat = 0.4478866 at qunatile 0.05
t-stat = 0.6919013 at qunatile 0.1
t-stat = 0.6494304 at qunatile 0.15
t-stat = 0.5634076 at qunatile 0.2
t-stat = 0.8452812 at qunatile 0.25
t-stat = 0.90115 at qunatile 0.3
t-stat = 0.9603982 at qunatile 0.35
t-stat = 1.125458 at qunatile 0.4
t-stat = 1.634068 at qunatile 0.45
t-stat = 1.477743 at qunatile 0.5
t-stat = 1.429976 at qunatile 0.55
t-stat = 1.422609 at qunatile 0.6
t-stat = 1.360318 at qunatile 0.65
t-stat = 1.453999 at qunatile 0.7
t-stat = 1.231448 at qunatile 0.75
t-stat = 1.06997 at qunatile 0.8
t-stat = 1.513412 at qunatile 0.85
t-stat = 1.165143 at qunatile 0.9
t-stat = 0.3843298 at qunatile 0.95
print(res.mean)
$stat
[1] 0.4478866 0.6919013 0.6494304 0.5634076 0.8452812 0.9011500 0.9603982 1.1254577 1.6340679
[10] 1.4777433 1.4299759 1.4226090 1.3603178 1.4539989 1.2314482 1.0699704 1.5134115 1.1651430
[19] 0.3843298
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=ind, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.01635507
t-stat = 0.9432091 at qunatile 0.05
t-stat = 0.6541958 at qunatile 0.1
t-stat = 0.7062462 at qunatile 0.15
t-stat = 0.680847 at qunatile 0.2
t-stat = 0.619235 at qunatile 0.25
t-stat = 0.6514719 at qunatile 0.3
t-stat = 0.6905105 at qunatile 0.35
t-stat = 0.6747241 at qunatile 0.4
t-stat = 0.6537154 at qunatile 0.45
t-stat = 0.9900143 at qunatile 0.5
t-stat = 0.7517768 at qunatile 0.55
t-stat = 1.032869 at qunatile 0.6
t-stat = 1.083666 at qunatile 0.65
t-stat = 0.8753321 at qunatile 0.7
t-stat = 1.098366 at qunatile 0.75
t-stat = 0.8982628 at qunatile 0.8
t-stat = 0.7166465 at qunatile 0.85
t-stat = 0.4523235 at qunatile 0.9
t-stat = 0.4185597 at qunatile 0.95
print(res.variance)
$stat
[1] 0.9432091 0.6541958 0.7062462 0.6808470 0.6192350 0.6514719 0.6905105 0.6747241 0.6537154
[10] 0.9900143 0.7517768 1.0328690 1.0836664 0.8753321 1.0983662 0.8982628 0.7166465 0.4523235
[19] 0.4185597
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
NA
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=cs, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.004213918
t-stat = 1.53996 at qunatile 0.05
t-stat = 2.016967 at qunatile 0.1
t-stat = 2.050142 at qunatile 0.15
t-stat = 2.088301 at qunatile 0.2
t-stat = 2.595438 at qunatile 0.25
t-stat = 2.605892 at qunatile 0.3
t-stat = 3.112786 at qunatile 0.35
t-stat = 2.691717 at qunatile 0.4
t-stat = 2.682952 at qunatile 0.45
t-stat = 2.533007 at qunatile 0.5
t-stat = 2.943646 at qunatile 0.55
t-stat = 3.113975 at qunatile 0.6
t-stat = 2.970052 at qunatile 0.65
t-stat = 2.844297 at qunatile 0.7
t-stat = 2.462373 at qunatile 0.75
t-stat = 1.967284 at qunatile 0.8
t-stat = 1.969251 at qunatile 0.85
t-stat = 1.557623 at qunatile 0.9
t-stat = 0.9345098 at qunatile 0.95
print(res.mean)
$stat
[1] 1.5399600 2.0169666 2.0501425 2.0883010 2.5954379 2.6058918 3.1127858 2.6917169 2.6829521
[10] 2.5330072 2.9436461 3.1139746 2.9700525 2.8442975 2.4623734 1.9672837 1.9692512 1.5576233
[19] 0.9345098
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=cs, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.004213918
t-stat = 1.363146 at qunatile 0.05
t-stat = 1.484858 at qunatile 0.1
t-stat = 1.984676 at qunatile 0.15
t-stat = 2.09195 at qunatile 0.2
t-stat = 2.157407 at qunatile 0.25
t-stat = 2.056692 at qunatile 0.3
t-stat = 2.004161 at qunatile 0.35
t-stat = 2.136833 at qunatile 0.4
t-stat = 2.014177 at qunatile 0.45
t-stat = 2.05706 at qunatile 0.5
t-stat = 1.679805 at qunatile 0.55
t-stat = 1.703154 at qunatile 0.6
t-stat = 1.548787 at qunatile 0.65
t-stat = 1.456017 at qunatile 0.7
t-stat = 1.591096 at qunatile 0.75
t-stat = 1.46536 at qunatile 0.8
t-stat = 1.254475 at qunatile 0.85
t-stat = 1.288802 at qunatile 0.9
t-stat = 0.6503795 at qunatile 0.95
print(res.variance)
$stat
[1] 1.3631460 1.4848585 1.9846755 2.0919503 2.1574069 2.0566919 2.0041605 2.1368329 2.0141774
[10] 2.0570595 1.6798050 1.7031538 1.5487873 1.4560171 1.5910957 1.4653600 1.2544751 1.2888024
[19] 0.6503795
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=cd, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.01081815
t-stat = 1.080921 at qunatile 0.05
t-stat = 1.350058 at qunatile 0.1
t-stat = 1.565517 at qunatile 0.15
t-stat = 2.088692 at qunatile 0.2
t-stat = 1.817806 at qunatile 0.25
t-stat = 2.980766 at qunatile 0.3
t-stat = 2.908592 at qunatile 0.35
t-stat = 2.73058 at qunatile 0.4
t-stat = 2.166032 at qunatile 0.45
t-stat = 2.877346 at qunatile 0.5
t-stat = 2.814555 at qunatile 0.55
t-stat = 2.752908 at qunatile 0.6
t-stat = 2.377886 at qunatile 0.65
t-stat = 2.79299 at qunatile 0.7
t-stat = 3.088789 at qunatile 0.75
t-stat = 2.427601 at qunatile 0.8
t-stat = 2.122129 at qunatile 0.85
t-stat = 1.494336 at qunatile 0.9
t-stat = 0.5957336 at qunatile 0.95
print(res.mean)
$stat
[1] 1.0809213 1.3500582 1.5655172 2.0886918 1.8178061 2.9807659 2.9085924 2.7305798 2.1660318
[10] 2.8773463 2.8145549 2.7529085 2.3778856 2.7929904 3.0887891 2.4276013 2.1221287 1.4943361
[19] 0.5957336
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=cd, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.01081815
t-stat = 0.8569511 at qunatile 0.05
t-stat = 1.23594 at qunatile 0.1
t-stat = 1.392564 at qunatile 0.15
t-stat = 1.312137 at qunatile 0.2
t-stat = 1.560275 at qunatile 0.25
t-stat = 1.36353 at qunatile 0.3
t-stat = 1.203195 at qunatile 0.35
t-stat = 1.081111 at qunatile 0.4
t-stat = 1.295826 at qunatile 0.45
t-stat = 1.289158 at qunatile 0.5
t-stat = 1.568963 at qunatile 0.55
t-stat = 1.606125 at qunatile 0.6
t-stat = 2.067215 at qunatile 0.65
t-stat = 2.251665 at qunatile 0.7
t-stat = 2.397834 at qunatile 0.75
t-stat = 2.030619 at qunatile 0.8
t-stat = 1.607081 at qunatile 0.85
t-stat = 1.153031 at qunatile 0.9
t-stat = 0.706502 at qunatile 0.95
print(res.variance)
$stat
[1] 0.8569511 1.2359396 1.3925638 1.3121370 1.5602745 1.3635296 1.2031952 1.0811106 1.2958264
[10] 1.2891578 1.5689634 1.6061249 2.0672152 2.2516654 2.3978340 2.0306186 1.6070814 1.1530307
[19] 0.7065020
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=hc, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.01959823
t-stat = 0.2745 at qunatile 0.05
t-stat = 0.3328019 at qunatile 0.1
t-stat = 0.7058297 at qunatile 0.15
t-stat = 0.983763 at qunatile 0.2
t-stat = 1.451899 at qunatile 0.25
t-stat = 1.972955 at qunatile 0.3
t-stat = 2.306328 at qunatile 0.35
t-stat = 2.349097 at qunatile 0.4
t-stat = 1.747932 at qunatile 0.45
t-stat = 1.395777 at qunatile 0.5
t-stat = 1.513734 at qunatile 0.55
t-stat = 1.84969 at qunatile 0.6
t-stat = 2.107128 at qunatile 0.65
t-stat = 2.123663 at qunatile 0.7
t-stat = 1.420358 at qunatile 0.75
t-stat = 1.316465 at qunatile 0.8
t-stat = 1.16768 at qunatile 0.85
t-stat = 0.5590186 at qunatile 0.9
t-stat = 0.2127827 at qunatile 0.95
print(res.mean)
$stat
[1] 0.2745000 0.3328019 0.7058297 0.9837630 1.4518986 1.9729553 2.3063278 2.3490971 1.7479320
[10] 1.3957771 1.5137336 1.8496897 2.1071279 2.1236628 1.4203584 1.3164645 1.1676802 0.5590186
[19] 0.2127827
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=hc, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.01959823
t-stat = 0.4021896 at qunatile 0.05
t-stat = 0.4025468 at qunatile 0.1
t-stat = 0.6393827 at qunatile 0.15
t-stat = 0.9342343 at qunatile 0.2
t-stat = 1.224105 at qunatile 0.25
t-stat = 1.41836 at qunatile 0.3
t-stat = 1.33546 at qunatile 0.35
t-stat = 1.872083 at qunatile 0.4
t-stat = 1.612517 at qunatile 0.45
t-stat = 1.506656 at qunatile 0.5
t-stat = 1.040281 at qunatile 0.55
t-stat = 0.6711762 at qunatile 0.6
t-stat = 0.7662079 at qunatile 0.65
t-stat = 0.7758022 at qunatile 0.7
t-stat = 0.5663423 at qunatile 0.75
t-stat = 0.7632547 at qunatile 0.8
t-stat = 0.6439748 at qunatile 0.85
t-stat = 0.5449504 at qunatile 0.9
t-stat = 0.1690933 at qunatile 0.95
print(res.variance)
$stat
[1] 0.4021896 0.4025468 0.6393827 0.9342343 1.2241052 1.4183597 1.3354602 1.8720833 1.6125169
[10] 1.5066559 1.0402814 0.6711762 0.7662079 0.7758022 0.5663423 0.7632547 0.6439748 0.5449504
[19] 0.1690933
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=fin, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.01377586
t-stat = 0.5669622 at qunatile 0.05
t-stat = 0.5292894 at qunatile 0.1
t-stat = 0.6524313 at qunatile 0.15
t-stat = 0.6957433 at qunatile 0.2
t-stat = 0.9667523 at qunatile 0.25
t-stat = 1.152522 at qunatile 0.3
t-stat = 1.491843 at qunatile 0.35
t-stat = 1.73792 at qunatile 0.4
t-stat = 1.999749 at qunatile 0.45
t-stat = 2.591633 at qunatile 0.5
t-stat = 2.142922 at qunatile 0.55
t-stat = 2.022149 at qunatile 0.6
t-stat = 1.631682 at qunatile 0.65
t-stat = 1.416534 at qunatile 0.7
t-stat = 1.386832 at qunatile 0.75
t-stat = 1.613497 at qunatile 0.8
t-stat = 1.382364 at qunatile 0.85
t-stat = 1.369943 at qunatile 0.9
t-stat = 0.3407541 at qunatile 0.95
print(res.mean)
$stat
[1] 0.5669622 0.5292894 0.6524313 0.6957433 0.9667523 1.1525223 1.4918430 1.7379199 1.9997486
[10] 2.5916335 2.1429223 2.0221493 1.6316825 1.4165341 1.3868319 1.6134972 1.3823641 1.3699429
[19] 0.3407541
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=fin, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.01377586
t-stat = 0.8810203 at qunatile 0.05
t-stat = 0.8641934 at qunatile 0.1
t-stat = 1.032748 at qunatile 0.15
t-stat = 0.7742663 at qunatile 0.2
t-stat = 0.7526622 at qunatile 0.25
t-stat = 1.093568 at qunatile 0.3
t-stat = 1.289097 at qunatile 0.35
t-stat = 1.698196 at qunatile 0.4
t-stat = 1.216006 at qunatile 0.45
t-stat = 1.022697 at qunatile 0.5
t-stat = 1.416344 at qunatile 0.55
t-stat = 1.011702 at qunatile 0.6
t-stat = 1.090192 at qunatile 0.65
t-stat = 1.184196 at qunatile 0.7
t-stat = 1.224683 at qunatile 0.75
t-stat = 0.975512 at qunatile 0.8
t-stat = 0.832322 at qunatile 0.85
t-stat = 0.6542419 at qunatile 0.9
t-stat = 0.3138409 at qunatile 0.95
print(res.variance)
$stat
[1] 0.8810203 0.8641934 1.0327480 0.7742663 0.7526622 1.0935680 1.2890969 1.6981958 1.2160060
[10] 1.0226975 1.4163436 1.0117017 1.0901916 1.1841955 1.2246830 0.9755120 0.8323220 0.6542419
[19] 0.3138409
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=comm, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.02634981
t-stat = 0.08873225 at qunatile 0.05
t-stat = 0.2185144 at qunatile 0.1
t-stat = 0.6420172 at qunatile 0.15
t-stat = 1.16198 at qunatile 0.2
t-stat = 1.499595 at qunatile 0.25
t-stat = 1.203883 at qunatile 0.3
t-stat = 1.174964 at qunatile 0.35
t-stat = 0.7206847 at qunatile 0.4
t-stat = 1.037148 at qunatile 0.45
t-stat = 1.157436 at qunatile 0.5
t-stat = 0.9133926 at qunatile 0.55
t-stat = 1.292222 at qunatile 0.6
t-stat = 1.297249 at qunatile 0.65
t-stat = 1.117367 at qunatile 0.7
t-stat = 1.819361 at qunatile 0.75
t-stat = 1.128314 at qunatile 0.8
t-stat = 0.8092348 at qunatile 0.85
t-stat = 0.5793701 at qunatile 0.9
t-stat = 0.3051107 at qunatile 0.95
print(res.mean)
$stat
[1] 0.08873225 0.21851438 0.64201722 1.16198008 1.49959456 1.20388296 1.17496387 0.72068472
[9] 1.03714798 1.15743619 0.91339256 1.29222205 1.29724940 1.11736732 1.81936133 1.12831422
[17] 0.80923482 0.57937007 0.30511065
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=comm, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.02634981
t-stat = 0.1965833 at qunatile 0.05
t-stat = 0.507935 at qunatile 0.1
t-stat = 0.7237396 at qunatile 0.15
t-stat = 0.9288064 at qunatile 0.2
t-stat = 1.040726 at qunatile 0.25
t-stat = 0.8645351 at qunatile 0.3
t-stat = 0.6175633 at qunatile 0.35
t-stat = 0.8231141 at qunatile 0.4
t-stat = 1.038075 at qunatile 0.45
t-stat = 0.8460387 at qunatile 0.5
t-stat = 0.5920455 at qunatile 0.55
t-stat = 0.369462 at qunatile 0.6
t-stat = 0.3737998 at qunatile 0.65
t-stat = 0.5448085 at qunatile 0.7
t-stat = 0.5381104 at qunatile 0.75
t-stat = 0.4116973 at qunatile 0.8
t-stat = 0.3986591 at qunatile 0.85
t-stat = 0.3176306 at qunatile 0.9
t-stat = 0.2460179 at qunatile 0.95
print(res.variance)
$stat
[1] 0.1965833 0.5079350 0.7237396 0.9288064 1.0407260 0.8645351 0.6175633 0.8231141 1.0380750
[10] 0.8460387 0.5920455 0.3694620 0.3737998 0.5448085 0.5381104 0.4116973 0.3986591 0.3176306
[19] 0.2460179
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
q0 <-seq(0.05, 0.95, by = 0.05) # 0.05, 0.10, .... , 0.90, 0.95
# causality in conditional mean
res.mean <- lrq.causality.test(x=pol,y=re, type="mean", q=q0) # note type = "mean"
Causality in Mean Test
bandwidth = 0.008795042
t-stat = 0.8721774 at qunatile 0.05
t-stat = 1.048697 at qunatile 0.1
t-stat = 1.203581 at qunatile 0.15
t-stat = 1.388833 at qunatile 0.2
t-stat = 1.861665 at qunatile 0.25
t-stat = 2.215456 at qunatile 0.3
t-stat = 2.354758 at qunatile 0.35
t-stat = 2.637895 at qunatile 0.4
t-stat = 2.926127 at qunatile 0.45
t-stat = 3.13953 at qunatile 0.5
t-stat = 3.233297 at qunatile 0.55
t-stat = 3.631777 at qunatile 0.6
t-stat = 2.468545 at qunatile 0.65
t-stat = 2.67161 at qunatile 0.7
t-stat = 2.269994 at qunatile 0.75
t-stat = 2.291339 at qunatile 0.8
t-stat = 1.693635 at qunatile 0.85
t-stat = 1.155259 at qunatile 0.9
t-stat = 0.8710635 at qunatile 0.95
print(res.mean)
$stat
[1] 0.8721774 1.0486975 1.2035807 1.3888330 1.8616650 2.2154556 2.3547578 2.6378951 2.9261275
[10] 3.1395297 3.2332969 3.6317772 2.4685454 2.6716101 2.2699941 2.2913388 1.6936351 1.1552594
[19] 0.8710635
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
res.variance <- lrq.causality.test(x=pol,y=re, type="variance", q=q0) # note type = "varaince"
Causality in Variance Test
bandwidth = 0.008795042
t-stat = 1.295072 at qunatile 0.05
t-stat = 1.464539 at qunatile 0.1
t-stat = 1.564838 at qunatile 0.15
t-stat = 1.775882 at qunatile 0.2
t-stat = 1.526233 at qunatile 0.25
t-stat = 1.571508 at qunatile 0.3
t-stat = 1.691312 at qunatile 0.35
t-stat = 1.649537 at qunatile 0.4
t-stat = 1.68138 at qunatile 0.45
t-stat = 1.434714 at qunatile 0.5
t-stat = 1.463873 at qunatile 0.55
t-stat = 1.313189 at qunatile 0.6
t-stat = 1.061302 at qunatile 0.65
t-stat = 1.368058 at qunatile 0.7
t-stat = 1.228548 at qunatile 0.75
t-stat = 1.042215 at qunatile 0.8
t-stat = 1.174278 at qunatile 0.85
t-stat = 0.8886398 at qunatile 0.9
t-stat = 0.5681894 at qunatile 0.95
print(res.variance)
$stat
[1] 1.2950720 1.4645391 1.5648381 1.7758825 1.5262327 1.5715079 1.6913117 1.6495366 1.6813797
[10] 1.4347138 1.4638732 1.3131894 1.0613021 1.3680578 1.2285481 1.0422151 1.1742778 0.8886398
[19] 0.5681894
$q
[1] 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95
plot.mean <- do.causality.figure(res.mean,title="Causality in Mean")
print(plot.mean)
plot.variance <- do.causality.figure(res.variance,title="Causality in Variance")
print(plot.variance)
NA
NA
NA
NA
NA